
cd jemalloc-3.6.0
sh autogen.sh
./configure --prefix=/opt/jemalloc
make && make install

echo 'export PATH=$PATH:/opt/jemalloc/bin' >> /etc/profile && source /etc/profile 
echo 'export PATH=$PATH:/opt/jemalloc/bin' >> /etc/bashrc && source /etc/bashrc

echo '/opt/jemalloc/lib' >> /etc/ld.so.conf.d/jemalloc.conf
echo '/opt/jemalloc/include/jemalloc' >> /etc/ld.so.conf.d/jemalloc.conf

ldconfig

